<?php
include "includes/ui.php";

echo headerHTML("stock", "เบิกพัสดุ");
?> 
<!-- Moldule: Popup -->
 
<div id="popup" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style='margin-left:-390px;width:800px;'>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel"><i class="icon-cog"></i> เบิกพัสดุ(พัสดุสิ้นเปลือง & พัสดุคงทน) </h3>
    </div>

    <form class="form-horizontal" id='frmshipment' style="margin-bottom: 0px!important;" method="post">
	<input type='hidden' id='pid' name='pid' value=''/>
        <div class="modal-body" style="overflow-y:auto;min-height:400px;">

            <div class="control-group">
                <label class="control-label" for="inputName"  style='width:120px !important;font-weight:bold;'><i class="icon-double-angle-right"></i> ชื่อผู้ขอเบิก</label>
                <div class="controls" style='margin-left:120px !important;'>
                
                    <!--input type="text" id="txtEmployeeName" required maxlength="50"-->
					<select id='cboEmployeeName' style='width:250px;' ></select>
                    <span class="help-inline" style="font-weight:bold;margin-left:70px;">วันที่เบิก​&nbsp;</span>

        
                       <div class="input-append date btndate1"   data-date="12-02-2012"  data-date-format="dd/mm/yyyy">
                            <input class="span1" style="width:100px !important;" id='txtRequestDate' required size="16" type="text"  readonly="">
                            <span class="add-on"><i class="icon-calendar"></i></span>
                        </div>      
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputName2"  style='width:120px !important;font-weight:bold;'><i class="icon-double-angle-right"></i> หมายเหตุ</label>
                <div class="controls" style='margin-left:120px !important;'>
                    <input type="text" id="txtRemark" class='span6' maxlength="300">

                </div>
            </div>
            
            <div class="well no-padding">
                <label class="control-label hidden_control" for="inputName"  style='width:120px !important;font-weight:bold;'><i class="icon-double-angle-right"></i> รายการ</label>
                <div style="padding:5px;background-color:#ffffff;" class='hidden_control'>
					<select id='cboProduct' class='select_product' style='width:200px;'  data-live-search="true" ></select>
                    <!--input type="text" id="txtProduct"  data-provide="typeahead"  data-items="5" data-source="" class='span4' placeholder="รายการพัสดุ" /-->
                    <input type="text" id="txtAmount"   class='span1 text-right' value="1" maxlength="3" />
                    <button class="btn btn-inverse" rel="tooltip" title="" id='btnAddProduct' type='button'   data-original-title="เพิ่มรายการ" >เพิ่ม</button>
                </div>
                <span class="help-inline text-center" id='Error' style="display:none;line-height: 25px;font-weight:bold;margin: auto;text-align: center;width: 100%;color: red !important;background-color: white;">กรุณาเลือกรายการ&nbsp;</span>
                <!-- Add News: WYSIWYG Edior -->
                <table class="table" id='table_detail' style='width:100% !important;'>
                    <thead>
                        <tr>
                            <th style='color:#333 !important;width:50px;'>#</th>
                            <th style='color:#333 !important;display:none;'>0</th>
							<th style='color:#333 !important;width:80px !important;' class='text-center'>รหัสพัสดุ</th>
                            <th style='color:#333 !important;' class='text-center'>รายการพัสดุ</th>
                            <th style='color:#333 !important;width:150px;' class='text-center'>จำนวน</th>
                            <th style='color:#333 !important;width:60px;' class='text-center'>ลบ</th>
                        </tr>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
                <!-- / Add News: WYSIWYG Edior -->

            </div> 
        </div>

        <div class="modal-footer">
            <button type='submit' class="btn btn-primary hidden_control" id="btnSave">บันทึก</button>
			<button type='button' class="btn btn-primary print_control" id="btnPrint">พิมพ์ใบเบิก</button>
            <button class="btn" data-dismiss="modal" id='btnCancel' aria-hidden="true">ยกเลิก</button>

        </div>
    </form>

</div> 
<!-- / Module: Popup --> 
<!-- Live Stats -->
<div class="row-fluid">

    <!-- Pie: Box -->
    <div class="span12">

        <!--  : Top Bar -->
        <div class="top-bar">
            <h3><i class="icon-cog"></i> เบิกพัสดุ</h3>

            <div class='tmp' style='float:right'>
                <a href="#popup" data-toggle="modal"><button class="btn btn-info" id="btnAdd" tooltip="Add">เพิ่มรายการ</button></a>
            </div>

        </div>
        <!-- /  : Top Bar -->
        <!-- Pie: Content -->
        <div class="well no-padding" >
            <div class="span12">
                <div class="row-fluid">
                    <form class="form-horizontal">
                        <div class='span12'>
                            <div class="control-group" style='border-bottom:0px;'>
                                <label class="control-label" style='padding-top:5px;' for="inputName">
                                    <i class="icon-double-angle-right"></i>รหัสพัสดุ</label>
                                <div class="controls">
                                    <input type="text" id="txtCode" maxlength='10' class='span2' placeholder="">
                                     <span class="help-inline" style='font-weight:bold;margin-left:70px;'>รายชื่อพัสดุ</span>&nbsp;
                                     <input type="text" id="txtProductName" maxlength='20' class="span3" placeholder="ชื่อพัสดุ">
                                     <span class="help-inline" style='font-weight:bold;margin-left:70px;'>ชื่อ-นามสกุล </span>&nbsp;
                                      <input type="text" id="txtEmpName" class="span3" placeholder="ชื่อ-นามสกุล ผู้เบิก">
                                </div>
                            </div>

                            <div class="control-group" style="border-bottom:0px;">
                                <label class="control-label" style='padding-top:5px;' for="inputName"><i class="icon-double-angle-right"></i>วันที่เบิก </label>
                                <div class="controls">
                                     
                                       <div class="input-append date btndate1"   data-date="12-02-2012"  data-date-format="dd/mm/yyyy">
                                        <input class="span1" style="width:100px !important;" id='txtDateFrom_s' size="16" type="text"  readonly="">
                                        <span class="add-on"><i class="icon-calendar"></i></span>
                                    </div>

                                    &nbsp;
                                    <div class="input-append date btndate2"   data-date="12-02-2012"  data-date-format="dd/mm/yyyy">
                                        <input class="span1" style="width:100px !important;" id='txtDateTo_s' size="16" type="text"  readonly="">
                                        <span class="add-on"><i class="icon-calendar"></i></span>
                                    </div> 
                                    <button class="btn btn-inverse" type='button' id='btnSearch' style='height:30px;margin-left:50px;margin-top:0px;padding-top:0px;' rel="tooltip" title=""   data-original-title="ค้นหาข้อมูล"><i class="icon-search"></i></button> 

                                </div>
                            </div>
 
                        </div>
                    </form>
                </div>
            </div>
            <table class="data-table" id="resultData">
                <thead style='border-top:1px solid #c2c2c2;border-bottom:1px solid #c2c2c2;'> 
                    <tr >
                        <th style='color:#333 !important;width:20px;'>#</th>
                        <th style='color:#333 !important;display:none;'>0</th> 
                        <th style='color:#333 !important;width:120px;' class='center'>วันที่เบิก</th>
                        <th style='color:#333 !important;' class='text-center'>ชื่อ-นามสกุล</th>
					 <th style='color:#333 !important;width:320px !important;' class="text-center"> หมายเหตุ </th> 
                        <th style='color:#333 !important;width:120px !important;' class="center">จำนวนรายการ </th>
                        <th style='color:#333 !important;width:80px !important;' class="center"> พิมพ์ </th> 
                        <th style='color:#333 !important;width:60px !important;' class="center"> ยกเลิก </th>
                    </tr>
                </thead>
                <tbody>
                    
                </tbody>

            </table>

        </div>
        <!-- / Pie: Content -->

    </div>
    <!-- / Pie -->

</div>
<!-- / Live Stats -->

<?php
echo footerHTML();
?>

<!-- Javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src='js/jquery.hotkeys.js'></script>
<!--script src='js/fullcalendar.min.js'></script-->
<script src="js/jquery-ui-1.10.2.custom.min.js"></script>
<script src="js/jquery.pajinate.js"></script>
<!--script src="js/jquery.prism.min.js"></script-->
<script src="js/jquery.dataTables.min.js"></script>

<script src="js/jquery.flot.resize.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-wysiwyg.js"></script>
<script src="js/bootstrap-typeahead.js"></script>
<script src="js/jquery.easing.min.js"></script>
<script src="js/jquery.chosen.min.js"></script>
<script src="js/avocado-custom.js"></script>

<script src="js/jqBootstrapValidation.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/myScript/js_shipment.js"></script>

</html>